package com.example.drop.api

import com.example.common.view.api.BaseApiService
import com.example.drop.entity.PointAddParam
import com.example.drop.entity.PointEntityItem
import com.example.drop.entity.TaskEntityItem
import com.example.drop.model.DropResultData
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface DropApiService:BaseApiService {
    @GET("/api/patrol-tasks")
    suspend fun getTask():DropResultData<List<TaskEntityItem>>
    @GET("/api/patrol-tasks/{id}")
    suspend fun getTaskById(@Path("id") id:Int):DropResultData<TaskEntityItem>
    @GET("/api/patrol-points")
    suspend fun getPoint():DropResultData<List<PointEntityItem>>
    @GET("/api/patrol-points/{id}")
    suspend fun getPointById(@Path("id") id:Int):DropResultData<PointEntityItem>
    @POST("/api/patrol-points")
    suspend fun postPoint(@Body pointAddParam: PointAddParam):DropResultData<PointEntityItem>
}